<template>
<!--pages/company/company.ttml-->
<view class="content">
	<view class="hr"></view>
	<view class="item">
		<text>登录名：</text>
		<input type="text" @input="username" placeholder="请输入你的登录名" placeholder-class="holder" bingblur="accountblur" />
	</view>
	<view class="item">
		<text>密码：</text>
		<input type="text" @input="password" placeholder="请输入密码" placeholder-class="holder" bingblur="accountblur" /> 
	</view>
	<button class="btn" type="primary" @tap="commit">提交资料
	</button>
</view>
</template>

<script>
let app = getApp();

export default {
  data() {
    return {
      form: {
        username: "",
        password: ""
      }
    };
  },

  components: {},
  props: {},
  methods: {
    username(e) {
      let form = this.form;
      form.username = e.detail.value;
      this.setData({
        form
      });
    },

    password(e) {
      let form = this.form;
      form.password = e.detail.value;
      this.setData({
        form
      });
    },

    commit(e) {
      var that = this;
      uni.request({
        url: `${app.globalData.baseUrl}/user/perfectInfo/${uni.getStorageSync('openid')}`,
        method: "POST",
        data: that.form,
        success: res => {
          uni.navigateBack({
            delta: 1,

            success(res1) {
              uni.showToast({
                title: '提交成功',
                icon: 'none',
                duration: 4000
              });
            }

          });
        }
      });
    },

    onShareTimeline() {}

  }
};
</script>
<style>
/* pages/company/company.ttss */
.content{
    width: 100%;
    height: 700px;
    background-color: #f2f2f2;
  }
  .hr{
    padding-top: 40px;
  }
  .item{
    background: #ffffff;
    width: 96%;
    height: 100rpx;
    line-height: 100rpx;
    margin: 2%;
    padding: 0rpx 20rpx;
  }
  .item text {
    float: left;
    height: 100rpx;
    width: 25%;
  }
  .item input{
    float: left;
    height: 100rpx;
    width: 75%;
  }
  .cell__bd{
    float: left;
    width: 100%;
  }
  .holder{
    font-size: 14px;
    color: #999999;
  }
  .flex{
    display: flex;
    flex-direction: row;
  }
  .flex input{
    width: 300px;
  }
  item switch{
    margin-top: 5px;
    margin-right: 5px;
  }
  .mobileInfo{
    display: flex;
    flex-direction: row;
  }
  .mobile{
    margin: 0 auto;
    border: 1px solid #cccccc;
    height: 40px;
    width: 50%;
    border-radius: 3px;
    background-color: #ffffff;
    margin-bottom: 15px;
    display: flex;
    flex-direction: row;
    margin-left: 5%; 
  }
  .mobile input{
    margin-top: 8px;
    margin-left: 10px;
  }
  .code{
    border: 1px solid #cccccc;
    height: 40px;
    width: 35%;
    background-color: #edeeec;
    border-radius: 3px;
    text-align: center;
    margin-left: 10px;
    line-height: 40px;
    color: #999999;
    font-size: 15px;
    margin-bottom: 15px;
    margin-right: 5%; 
  }
  .btn{
    width: 90%;
    color: #999999;
    margin-top: 40px;
  }
  .xieyi{
    margin-top: 15px;
    margin-left: 15px;
    font-size: 13px;
  }
  .agree{
    margin-left: 5px;
    color: #666666; 
  }
  .opinion{
    color: red;
    font-weight: bold;
    text-decoration: underline;
  }
  .picker{
    height: 90rpx;
  }
  
</style>